/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package rn;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JProgressBar;

/**
 *
 * @author roberta.m.carvalho
 */
public class Barra extends JFrame {

    JProgressBar bar = new JProgressBar();
    static public final int MY_MINIMUM = 0;
    static public final int MY_MAXIMUM = 100;

    public Barra() {
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        for (int i = Barra.MY_MINIMUM; i <= Barra.MY_MAXIMUM; i++) {
            final int percent = i;
            bar.setValue(percent);
        }
        getContentPane().add(bar, BorderLayout.NORTH);
        pack();
        setLocationRelativeTo(null);
        setVisible(true);
    }
}
/*JPanel {
JProgressBar pbar;

static public final int MY_MINIMUM = 0;

static public final int MY_MAXIMUM = 100;

public Barra() {
pbar = new JProgressBar();
pbar.setMinimum(MY_MINIMUM);
pbar.setMaximum(MY_MAXIMUM);
pbar.setStringPainted(true);
add(pbar);
}

public void atualizaBarra(int valor) {
pbar.setValue(valor);
}

}*/
